home *** CD-ROM | disk | FTP | other *** search
/ Champak 50 / Volume 50 - JOGO DISK .iso / Games / mallcrawl.swf / scripts / DefineSprite_883 / frame_1 / DoAction.as
Text File  |  2007-09-28  |  1KB  |  37 lines

  1. function charOnRelease()
  2. {
  3.    tweenMe(this);
  4.    _global.char_selected = this._name;
  5.    delete this.onRelease;
  6. }
  7. function tweenMe(mc)
  8. {
  9.    mc.swapDepths(this.getNextHighestDepth());
  10.    this.fadeChars(mc);
  11.    this.TweenX = new mx.transitions.Tween(mc,"_x",mx.transitions.easing.Regular.easeOut,mc._x,0,1,true);
  12.    this.TweenY = new mx.transitions.Tween(mc,"_y",mx.transitions.easing.Regular.easeOut,mc._y,0,1,true);
  13.    this.TweenXScale = new mx.transitions.Tween(mc,"_xscale",mx.transitions.easing.Regular.easeOut,mc._xscale,150,1,true);
  14.    this.TweenYScale = new mx.transitions.Tween(mc,"_yscale",mx.transitions.easing.Regular.easeOut,mc._yscale,150,1,true);
  15.    this.play();
  16. }
  17. function fadeChars(mc)
  18. {
  19.    var _loc2_ = 0;
  20.    while(_loc2_ < charStore.length)
  21.    {
  22.       if(this.charStore[_loc2_]._name != mc._name)
  23.       {
  24.          this.charStore[_loc2_].enabled = false;
  25.          this.charStore[_loc2_].fade = new mx.transitions.Tween(this.charStore[_loc2_],"_alpha",mx.transitions.easing.None.easeNone,100,0,1,true);
  26.       }
  27.       _loc2_ = _loc2_ + 1;
  28.    }
  29. }
  30. var charStore = new Array();
  31. _global.char_selected = undefined;
  32. var TweenX;
  33. var TweenY;
  34. var TweenXScale;
  35. var TweenYScale;
  36. stop();
  37.